package com.sc.study.sleeproom.service.impl;

import com.sc.study.sleeproom.domain.ScSleepRoomPersonChangeLog;
import com.sc.study.sleeproom.mapper.ScSleepRoomPersonChangeLogMapper;
import com.sc.study.sleeproom.service.IScSleepRoomPersonChangeLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * 寝室人员更换日志Service业务层处理
 * 
 * @author sc
 * @date 2022-04-03
 */
@Service
public class ScSleepRoomPersonChangeLogServiceImpl implements IScSleepRoomPersonChangeLogService {

    @Autowired
    private ScSleepRoomPersonChangeLogMapper mapper;

    /**
     * 新增日志
     * @param scSleepRoomPersonChangeLog
     * @return
     */
    @Override
    public Integer insertLog(ScSleepRoomPersonChangeLog scSleepRoomPersonChangeLog){
        scSleepRoomPersonChangeLog.setChangeTime(new Date());
        return mapper.insertLog(scSleepRoomPersonChangeLog);
    }
}
